﻿/***********************************************************************
 *            Project: CoreCms
 *        ProjectName: 核心内容管理系统                                
 *                Web: https://www.corecms.net                      
 *             Author: 大灰灰                                          
 *              Email: jianweie@163.com                                
 *         CreateTime: 2021/1/31 21:45:10
 *        Description: 暂无
 ***********************************************************************/

using System.Threading.Tasks;
using CoreCms.Net.Caching.AccressToken;
using CoreCms.Net.IServices;
using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.WeChat.Service.Enums;
using CoreCms.Net.WeChat.Service.HttpClients;
using CoreCms.Net.WeChat.Service.Options;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using SKIT.FlurlHttpClient.Wechat.Api;
using SKIT.FlurlHttpClient.Wechat.Api.Models;

namespace CoreCms.Net.Web.WebApi.Controllers
{
    /// <summary>
    ///     默认接口示例
    /// </summary>
    public class DemoController : ControllerBase
    {
        private ICoreCmsPagesServices _pagesServices;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="pagesServices"></param>
        public DemoController(ICoreCmsPagesServices pagesServices)
        {
            _pagesServices = pagesServices;
        }


        /// <summary>
        ///     默认首页
        /// </summary>
        /// <returns></returns>
        public async Task<WebApiCallBack> Index()
        {
            var item = await _pagesServices.GetPageConfig("mobile22021100321361811869");
            return item;
        }




    }
}